#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<unordered_map>
using namespace std;
int subarraysDivByK(vector<int>& nums, int k)
{
    unordered_map<int, int> hash;
    int sum = 0;
    int ret = 0;
    hash[0 % k] = 1;
    for (auto e : nums)
    {
        sum += e;
        int r = (sum % k + k) % k;
        if (hash.count(r))
        {
            ret += hash[r];
        }
        hash[r]++;
    }
    return ret;
}


int main()
{

    return 0;
}

